package zz.demo.springCloud.wechat.config;

import org.springframework.context.annotation.Configuration;

/**
 * Created by zhangzheng on 2017-11-15.
 */
@Configuration
public class Oauth2FeignConfiguration {

//    @Bean
//    public ClientCredentialsResourceDetails clientCredentialsResourceDetails() {
//        ClientCredentialsResourceDetails details = new ClientCredentialsResourceDetails();
//        details.setAccessTokenUri("http://user:1@localhost:2103/oauth/token");
//        details.setId("wechat-service");
//        details.setClientId("wechat-service");
//        details.setClientSecret("123456");
//        details.setScope(Arrays.asList("wechat"));
//        return details;
//    }

//    @Bean
//    public OAuth2FeignRequestInterceptor oauth2FeignRequestInterceptor(){
//        return new OAuth2FeignRequestInterceptor(new DefaultOAuth2ClientContext(),this.clientCredentialsResourceDetails());
//    }
}
